$default_charset
$default_charset
Class for parsing MIME messages
decode_address_list(string|array $input, int $max = null, bool $decode = true, string $fallback = null, bool $addronly = false) : array
Split an address list into a structured array list
string|array | $input | Input string (or list of strings) |
int | $max | List only this number of addresses |
bool | $decode | Decode address strings |
string | $fallback | Fallback charset if none specified |
bool | $addronly | Return flat array with e-mail addresses only |
Indexed list of addresses
explode_header_string(string $separator, string $str, bool $remove_comments = false) : array
Explodes header (e.g. address-list) string into array of strings using specified separator characters with proper handling of quoted-strings and comments (RFC2822)
string | $separator | String containing separator characters |
string | $str | Header string |
bool | $remove_comments | Enable to remove comments |
Header items
unfold_flowed(string $text, string $mark = null, bool $delsp = false) : string
Interpret a format=flowed message body according to RFC 2646
string | $text | Raw body formatted as flowed text |
string | $mark | Mark each flowed line with specified character |
bool | $delsp | Remove the trailing space of each flowed line |
Interpreted text with unwrapped lines and stuffed space removed
wordwrap(string $string, int $width = 75, string $break = " ", bool $cut = false, string $charset = null, bool $wrap_quoted = true) : string
Improved wordwrap function with multibyte support.
The code is based on Zend_Text_MultiByte::wordWrap().
string | $string | Text to wrap |
int | $width | Line width |
string | $break | Line separator |
bool | $cut | Enable to cut word |
string | $charset | Charset of $string |
bool | $wrap_quoted | When enabled quoted lines will not be wrapped |
Text
file_content_type(string $path, string $name, string $failover = 'application/octet-stream', bool $is_stream = false, bool $skip_suffix = false) : string
A method to guess the mime_type of an attachment.
string | $path | Path to the file or file contents |
string | $name | File name (with suffix) |
string | $failover | Mime type supplied for failover |
bool | $is_stream | Set to True if $path contains file contents |
bool | $skip_suffix | Set to True if the config/mimetypes.php map should be ignored |